<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <tr>
        <th>用户名</th>
        <th>密码</th>
        <th>昵称</th>
    </tr>
</table>

<script>
    let users = [{username:"刘备",password:123456,nickname:"老大"},
        {username:"关羽",password:123456,nickname:"老二"},
        {username:"张飞",password:123456,nickname:"小三"}];
    let table = document.querySelector("table");
    for (let product of users){
        let tr = document.createElement("tr");
        let nameTd = document.createElement("td");
        let passwordTd = document.createElement("td");
        let nicknameTd = document.createElement("td");
        nameTd.innerText = product.username;
        passwordTd.innerText = product.password;
        nicknameTd.innerText = product.nickname;
        tr.append(nameTd,passwordTd,nicknameTd);
        table.append(tr);
    }
</script>
</body>
</html>